package com.springboot.demo.io.socketmultiplex;

/**
 * 主方法
 *
 * @author supu
 * @since 2020-11-12 17:29
 **/
public class MainThread {
    public static void main(String[] args) {
        // 1、启动工作线程组
        SelectorThreadGroup bossGroup = new SelectorThreadGroup(2);

        SelectorThreadGroup workGroup = new SelectorThreadGroup(3);

        bossGroup.setWorkGroup(workGroup);

        // 2、server 绑定端口
        bossGroup.bind(9000);
        bossGroup.bind(9900);
    }
}
